// basic
.w-100 {
  width: 100%;
}
.w-auto {
  width: auto !important;
}
.h-100 {
  height: 100%;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.d-flex-row {
  display: flex !important;
  flex-direction: row !important;
  &.wrap {
    flex-wrap: wrap;
  }
  &.space-between {
    justify-content: space-between;
  }
  &.space-around {
    justify-content: space-around;
  }
}
.x-start {
  justify-content: flex-start;
}
.x-center {
  justify-content: center;
}
.x-end {
  justify-content: flex-end;
}
.y-center {
  align-items: center;
}
.d-flex-col {
  display: flex !important;
  flex-direction: column !important;
}
.flex-grow {
  flex-grow: 1;
  overflow: auto;
}
.cursor-pointer {
  cursor: pointer;
}
.d-inline {
  display: inline;
}
.title {
  margin-bottom: 12px;
  color: rgba(0, 0, 0, 0.85);
  font-size: 16px;
  line-height: 24px;
}
.description {
  box-sizing: border-box;
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  line-height: 1.5715;
}
.border-all {
  border: 1px solid #ebeef5;
}
.border-0 {
  border-width: 0px;
}
.border-top {
  border-top: 1px solid #ebeef5;
}
.border-bottom {
  border-bottom: 1px solid #ebeef5;
}
.border-left {
  border-left: 1px solid #ebeef5;
}
.border-right {
  border-right: 1px solid #ebeef5;
}
// 表单弹窗组件append-to-body后需此样式定位tag组件
.tag {
  position: absolute;
  left: 100%;
  width: 100%;
  margin-top: 10px;
  > div {
    margin-top: 5px;
    &:first-child {
      margin-top: 0;
    }
  }
}
// BIM-模型弹窗样式
.bim-model {
  margin: 20px 20px 20px 20px;
  > .el-dialog {
    margin: 0 !important;
    width: 100%;
    height: 100%;
    > .el-dialog__body {
      height: calc(100% - 56px);
      box-sizing: border-box;
      .scene-box {
        height: 100% !important;
      }
    }
  }
  &.footer > .el-dialog > .el-dialog__body {
    height: calc(100% - 108px);
  }
}
// BIM-构件集样式
.editable-item {
  position: relative;
  padding: 10px;
  margin-bottom: 3px;
  border-radius: 3px 0 0 3px;
  background-color: white;
  cursor: default;
  .title {
    font-size: 16px;
    color: black;
    margin: 0;
    padding-right: 10px;
    padding-bottom: 3px;
  }
  .discription {
    font-size: 12px;
    color: #afafaf;
    padding-right: 20px;
  }
  .el-icon-close {
    position: absolute;
    right: 7px;
    top: 7px;
    color: #f56c6c;
    cursor: pointer;
    transform: scale(0);
    pointer-events: none;
  }
  &.active {
    background-color: #f0f2f5;
    .title,
    .discription span {
      color: #409eff;
    }
    .el-icon-close {
      transform: scale(1);
      pointer-events: auto;
    }
  }
}
// BIM-构件树
.product-tree {
  width: 100%;
  height: 100%;
  background-color: rgba(127, 171, 255, 0.1);
  border-radius: 4px;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: auto;
  .ztree {
    flex-grow: 1;
    overflow: auto;
    line-height: 1;
    @include dark-scrollbar;
    li {
      position: relative;
      a {
        color: white !important;
        margin-right: 20px !important;
        .toggle-button {
          position: absolute;
          right: 3px;
          font-size: 16px;
          padding: 1.5px 0;
          color: #409eff;
          &.hide {
            color: gray;
          }
        }
        &:hover {
          color: #3aa0ff !important;
        }
      }
    }
    .curSelectedNode .node_name {
      color: #3aa0ff !important;
      background-color: transparent !important;
    }
    .button.checkbox_true_part::after {
      width: 8px !important;
    }
    .button.checkbox_true_part_focus::after {
      width: 8px !important;
    }
  }
}
// BIM构件信息弹窗
.info-drawer {
  position: absolute;
  width: 250px;
  height: 100%;
  right: 0;
  top: 0;
  background-color: rgba(127, 171, 255, 0.1);
  border: 0;
  padding: 0;
  overflow: visible;
  .el-card__header {
    border: 0;
    color: white;
    padding: 14px 20px;
  }
  .el-card__body {
    background-color: rgba(127, 171, 255, 0.1);
    width: 100%;
    height: calc(100% - 47px);
    box-sizing: border-box;
  }
  .card-body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    ::-webkit-scrollbar {
      height: 0;
    }
  }
  .value-box {
    min-height: 41px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.5rem;
    text-align: left;
    color: white;
  }
  .el-collapse-item__wrap {
    background-color: transparent;
    border: 0;
  }
  .el-collapse {
    border: 0;
    background-color: rgba(127, 171, 255, 0.1);
  }
  .el-collapse-item__header {
    background-color: rgba(127, 171, 255, 0.1);
    padding-left: 14px;
    padding-right: 14px;
    color: #7fabff;
    border: 0;
  }
  .el-collapse-item__content {
    padding: 14px;
  }
  .tab-nav {
    position: absolute;
    right: 100%;
    top: 49px;
  }
  .tab-nav-item {
    width: 28px;
    padding: 10px 7px;
    background-color: rgba(71, 167, 255, 0.41);
    color: white;
    margin-bottom: 13px;
    position: relative;
    cursor: pointer;
    border-top-left-radius: 3px;
    box-sizing: border-box;
    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 100%;
      width: 0;
      border-top: 24px solid rgba(71, 167, 255, 0.41);
      border-left: 28px solid transparent;
    }
    &.active {
      background-color: rgba(71, 167, 255, 0.9);
      &::after {
        border-top-color: rgba(71, 167, 255, 0.9);
      }
    }
  }
  .empty {
    color: gray;
    text-align: center;
    line-height: 4;
  }
}
// 侧边栏关闭按钮
.aside-close-button {
  padding: 9px;
  margin-right: 10px;
}
//cascader高度
.el-cascader-menu {
  height: 300px;
}
// 渐入动画
.slide-fade-enter-active {
  transition: all 0.3s ease;
}
.slide-fade-leave-active {
  transition: all 0.3s ease;
}
.slide-fade-enter,
.slide-fade-leave-to {
  transform: translateX(10px);
  opacity: 0;
}
.vm {
  vertical-align: middle !important;
}
.vb {
  vertical-align: baseline !important;
}
// 定义内外边距，遍历0-40
@for $i from 0 through 40 {
  // 只要双数和能被5除尽的数
  @if $i % 2 == 0 or $i % 5 == 0 {
    .f-#{$i} {
      font-size: $i + px !important;
    }
    // 得出：m-0
    .m-#{$i} {
      margin: $i + px !important;
    }
    .m-x-#{$i} {
      margin-left: $i + px !important;
      margin-right: $i + px !important;
    }
    .m-y-#{$i} {
      margin-top: $i + px !important;
      margin-bottom: $i + px !important;
    }
    // 得出：p-2
    .p-#{$i} {
      padding: $i + px !important;
    }
    .p-x-#{$i} {
      padding-left: $i + px !important;
      padding-right: $i + px !important;
    }
    .p-y-#{$i} {
      padding-top: $i + px !important;
      padding-bottom: $i + px !important;
    }
    @each $short, $long in l left, t top, r right, b bottom {
      // 缩写版，结果如： m-l-30
      // 定义外边距
      .m-#{$short}-#{$i} {
        margin-#{$long}: $i + px !important;
      }
      // 定义内边距
      .p-#{$short}-#{$i} {
        padding-#{$long}: $i + px !important;
      }
    }
  }
}

//这是调整vue-treeselect 插件的样式
@mixin treeselect-main($size) {
  @if $size== "medium" {
    height: 36px;
    line-height: 20px;
    .vue-treeselect__control {
      height: 36px;
    }
    .vue-treeselect__option {
      padding-top: 4px;
      padding-bottom: 4px;
    }
  } @else if $size== "mini" {
    height: 28px;
    line-height: 15px;
    .vue-treeselect__control {
      height: 28px;
    }
    .vue-treeselect__option {
      padding-top: 3px;
      padding-bottom: 3px;
    }
    .vue-treeselect__placeholder {
      font-size: 12px;
      // padding-bottom: 10px;
    }
  } @else {
    height: 32px;
    line-height: 15px;
    .vue-treeselect__control {
      height: 32px;
    }
    .vue-treeselect__option {
      padding-top: 3px;
      padding-bottom: 3px;
    }
  }
}
//dialog高度400
.dialog-h-400 {
  .el-dialog__body {
    max-height: 400px !important;
    overflow-y: auto;
  }
}
.cell-filelist {
  color: #409eff;
  width: 100%;
  white-space: nowrap;
  cursor: pointer;
}
::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 6px;
  height: 6px;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  border-radius: 6px;
  box-shadow: none;
  background: rgba(144, 147, 153, 0.3);
}
::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  box-shadow: none;
  border-radius: 6px;
  background: rgba(127, 171, 255, 0.1);
}
